package org.example;

import java.math.BigDecimal;

public enum FruitEnum {
    APPLE("苹果", new BigDecimal("8"), new BigDecimal("1")),
    STRAWBERRY("草莓", new BigDecimal("13"), new BigDecimal("1")),
    MANGO("芒果", new BigDecimal("20"), new BigDecimal("1"));

    private final String name;
    private final BigDecimal price;
    private BigDecimal discount;

    FruitEnum(String name, BigDecimal price, BigDecimal discount) {
        this.name = name;
        this.price = price;
        this.discount = discount;
    }

    public String getName() {
        return name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }
    
}
